package com.ithuameng.notice.config;

import com.ithuameng.notice.netty.NettyServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置netty服务端启动
 */
@Configuration
public class NettyConfig {

    @Bean
    public NettyServer createNettyServer() {
        NettyServer nettyServer = new NettyServer();
        new Thread(() -> nettyServer.start(1234)).start();
        return nettyServer;
    }
}
